﻿using System;
using System.Dynamic;

namespace Scheduler
{
    public abstract class Context
    {
        /// <summary>
        ///  <see cref="Engine.DUTPoint"/>
        /// 逻辑位置
        /// </summary>
        public object DUT { get; set; }
        public bool UserCancelled { get; set; } = false;
        public abstract object Next(object workerId);
        public abstract bool SkipWorker(object workerId);
        public abstract object LoadPass(object workerId, EventId eId);
        public abstract object UnloadPass(object workerId,EventId  eId, object chip);


        public void UpdateDUT()
        {
            DUT = GetNextPassDUT();
        }
        /// <summary>
        /// 给他一个提取动作
        /// </summary>
        public Func<object> GetNextPassDUT { get; set; }
    }
}